Skip to content

ci: capture pytest exit codes and build test-status.json per label - #913

Open
CagriYonca wants to merge 1 commit into
mainfrom
currency-update
Open

CagriYonca wants to merge 1 commit into
mainfrom
currency-update

Conversation

@CagriYonca

@CagriYonca CagriYonca commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Why

Previously, when pytest encountered test failures in CI, the test jobs failed immediately before saving coverage, pip freeze, and test metadata to the workspace. Consequently, downstream artifact collection jobs could not run or produce artifacts on failed runs, preventing the currency reporter pipeline from receiving updated dependency and test status data.

How

  • Deferred Job Failure: Captured pytest exit codes in run-tests-with-coverage-report without exiting immediately, and added fail-if-tests-failed as the final step across all test jobs (when: always) to ensure all workspace files and artifacts are persisted before failing.
  • Extract Failed Modules: Extracted failed test module names from pytest output to track failures at the individual package level.
  • Package-Level test-status.json: Updated final_job to aggregate all failed test modules across matrix jobs and build a package-level test-status.json (stored alongside installed_*.txt in artifacts).
  • Workflow Dependency (: terminal): Updated final_job and update-currency-versions workflow requirements to use : terminal so that artifacts and reports are produced regardless of test job outcomes.

Verification

  • Verified CircleCI configuration to ensure exit codes, failed test modules, and pip freeze outputs are preserved on both passing and failing runs.
  • Validated end-to-end integration with rupy-currency-reporter using the generated test-status.json artifact format.

@CagriYonca CagriYonca self-assigned this Oct 7, 2026
@CagriYonca CagriYonca added do NOT merge Depends on another PR or WIP ci/cd labels Oct 7, 2026
@CagriYonca
CagriYonca force-pushed the currency-update branch 7 times, most recently from 68fc532 to 0a145f1 Compare October 8, 2026 09:04
@CagriYonca CagriYonca removed the do NOT merge Depends on another PR or WIP label Oct 8, 2026
@CagriYonca
CagriYonca marked this pull request as ready for review October 8, 2026 11:27
@CagriYonca
CagriYonca requested a review from a team as a code owner October 8, 2026 11:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant